home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / allocate_mapping < prev    next >
Text File  |  2001-04-06  |  986b  |  27 lines

  1. DEPRECATED
  2. SYNOPSIS
  3.         mapping allocate_mapping(int size, int width)
  4.  
  5. DESCRIPTION
  6.         Reserve memory for a mapping.
  7.  
  8.         size is the number of entries (i.e. keys) to reserve, width is
  9.         the number of data items per entry. If the optional width is
  10.         omitted, 1 is used as default.
  11.  
  12.         This is useful only when you are going to construct a mapping
  13.         whose approximate size you know beforehand, to save on malloc
  14.         overhead. If you don't fill in data for all the allocated
  15.         elements, any leftovers will be freed after the current
  16.         function execution ended. It is also useful if you want the
  17.         mapping to have a certain width even if you don't provide
  18.         all the data items for the keys yet.
  19.         
  20. HISTORY
  21.         Renamed to 'm_allocate()' in LDMud 3.2.6.
  22.         Since LDMud 3.2.9, not available if driver is compiled without
  23.           USE_DEPRECATED.
  24.  
  25. SEE ALSO
  26.         mappings(LPC), walk_mapping(E), get_type_info(E)
  27.